The present invention relates to an image processing apparatus, method, and computer readable memory for processing input image data.
As an example of a conventional color image processing apparatus, color processing in a color copying machine is described below with the aid of FIG. 17.
Reference numeral 101 denotes a color image input unit such as an image reader unit of the color copying machine. In addition, the color image input unit 101 includes an original image reading device such as a color image scanner, an image input unit from a computer in a broad sense, and the like.
The color image input unit 101 outputs three color-separated signals R1, G1, and B1 which are obtained by color-separating each pixel of a color image into R, G, and B components. The three color-separated signals R1, G1, and B1 are input to an achromatic color/chromatic color determination unit 102. The unit 102 determines if the pixel of interest is a monochrome (achromatic color) pixel or a color (chromatic color) pixel, and outputs a determination signal KC to a color correction unit 107 on the basis of the determination result. The signal G1 of the three color-separated signals is input to a character/image determination unit 104, which checks if the pixel of interest corresponds to a line image such as a character, thin line, or the like, or a continuous-gradation image such as a picture image, printed image, or the like. The unit 104 outputs a character/image determination signal TI on the basis of the determination result.
The character/image determination signal TI is input to a spatial filter coefficient storage unit 105. When the corresponding pixel corresponds to a character signal, character spatial filter coefficients 1601 (see FIG. 18) are selected and output; when the corresponding pixel corresponds to an image signal, image spatial filter coefficients 1602 (see FIG. 18) are selected and output.
Conventional spatial filter processing including edge emphasis and the like is explained below.
FIG. 18 shows examples of the character spatial filter coefficients 1601 and image spatial filter coefficients 1602 described in FIG. 17 and each defined by a 5.times.5 pixel matrix. The character spatial filter coefficients 1601 are determined to effect stronger edge emphasis for an image than the image spatial filter coefficients 1602. Character or image spatial filter coefficients Kij selected in accordance with the character/image determination signal TI are set in a spatial filter 103 including R, G, and B spatial filters 103R, 103G, and 103B for R, G, and B signals. The individual spatial filters edge-emphasize the three color-separated signals R1, G1, and B1 to output three edge-emphasized color-separated signals R2, G2, and B2.
FIG. 19 shows an example of the detailed arrangement of the R spatial filter 103R.
A dotted frame 1701 represents a data delay circuit arranged in the R spatial filter 103R and including line memories 801 to 804. The signal R1 is input to the R spatial filter 103, and the line memories 801 to 804 store image data for four lines. The stored image data for four lines and image data for the line of interest, i.e., image data for a total of five lines, are sequentially input to flip-flops in units of lines to output data (Xj1 to Xj5) for five successive pixels. The signal R1 for 5 lines.times.5 pixels, i.e., a total of 25 signals R1, are input to an edge emphasis calculation circuit (R edge emphasis section) indicated by the next dotted frame 1702, which respectively multiplies the 25 input signals by spatial filter coefficients (.alpha.ij: 1.ltoreq.i.ltoreq.5, 1.ltoreq.j.ltoreq.5) indicated by a dotted frame 1703 and corresponding to the pixel layout and sums up the products.
The spatial filter processing for an R signal has been described, and the same applies to G and B signals.
The three edge-emphasized color-separated signals R2, G2, and B2 are input to a luminance/density conversion unit 106, and are converted into density signals C1, M1, and Y1 by, e.g., log conversion. The density signals C1, M1, and Y1 are input to a color correction unit 107 to be subjected to color processing such as generation of a black signal K, undercolor removal, color correction, and the like. As a result of the color processing, density signals C2, M2, Y2, and K2 are generated. Also, the color correction unit 107 sets the density signals C2, M2, and Y2 at C2=M2=Y2=0 in accordance with the determination signal KC as the determination result of the achromatic color/chromatic color determination unit 102 when the corresponding pixel is an achromatic pixel, thereby converting the corresponding pixel into a pixel defined by black color alone.
Reference numeral 110 denotes a color image output unit which comprises an image recording apparatus such as an electrophotographic or ink-jet printer. When the color image output unit 110 is, e.g., a binary printer, the density signals C2, M2, Y2, and K2 are converted into binary signals C3, M3, Y3, and K3 by a binarization unit 108. On the other hand, when the resolution of the image input from the color image input unit 101 is different from that of the image to be output from the color image output unit 110, the binary pixel signals C3, M3, Y3, and K3 are subjected to resolution conversion processing by a smoothing/resolution conversion unit 109 to be converted into binary signals C4, M4, Y4, and K4. Especially, when the resolution of the color image output unit 110 is higher than that of the color image input unit 101, smoothing processing for smoothly interpolating edge portions of the image is performed. The binary signals C4, M4, Y4, and K4 are recorded by the color image output unit 110.
However, when the input image is a color image, the above-mentioned color image processing apparatus requires spatial filters in correspondence with the R signal (103R), G signal (103G), and B signal (103B). If the input image is a black-and-white or monocolor image, not all the R, G, and B spatial filters need be used to perform spatial filter processing of the input image. For this reason, some spatial filters are wasted.
In order to especially improve the image quality of a monochrome image using a color image apparatus, it is required to improve filter characteristics by increasing the filter size. However, this results in high cost.